package by.jabbby.dataprovider;

import java.util.HashMap;
import java.util.Map;

public class Account {

	//private final String NAME = "name";
	//private final String DOMEN = "domen";
	private JabberServer jabberServer; 

	
	private final String LOGIN = "login";
	private final String PASSWORD = "password";
	Map<String, String> attributes;

	public Account(JabberServer jabberServer) {
		attributes = new HashMap<String, String>();
		this.jabberServer =jabberServer;
	}

/*	public String getName() {
		return attributes.get(NAME);
	}

	public void setName(String name) {
		attributes.put(NAME, name);
	}

	public String getDomen() {
		return attributes.get(DOMEN);
	}

	public void setDomen(String domen) {
		attributes.put(DOMEN, domen);
	}
*/
	public String getLogin() {
		return attributes.get(LOGIN);
	}

	public void setLogin(String login) {
		attributes.put(LOGIN, login);
	}

	public void setPassword(String password) {
		attributes.put(PASSWORD, password);
	}

	public String getPassword() {
		return attributes.get(PASSWORD);
	}
	
	public String getConnectionString(){
		String connStr = this.getLogin()+"@"+ getJabberServer().getHost();
		return connStr;
	}
	
	public JabberServer getJabberServer(){
		return jabberServer;
	}

}
